package follow.pratice.in2020.November;


public class Case_1 {

    public static void main(String[] args) {

        Person1 person = new Person1();

        System.out.println(person.toString());

        person.setAge(12);
        person.setName("小龙女");

        System.out.println(person.toString());


    }


}


class Person1 {
    private int age;
    private String name;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }


}
